<!--
 * @Description:
 * @Author: changqing
 * @Date: 2021-05-25 13:50:24
 * @LastEditTime: 2021-05-26 15:20:15
 * @LastEditors: changqing
 * @Usage:
-->
<script lang="ts">
import { defineComponent, h } from 'vue'
import { useRoute, useRouter } from 'vue-router'

export default defineComponent({
  name: 'Redirect',
  setup() {
    const route = useRoute()
    const router = useRouter()
    const { query, params } = route
    router.replace({
      path: '/' + params.path,
      query
    })
    return () => {
      return h('template')
    }
  }
})
</script>
